﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace Logistics.DataManage.Server
{
    public class RemoteDataWebService : IRemoteDateService
    {
        private String webserviceAddr = "";

        public RemoteDataWebService()
        {
            this.webserviceAddr = GlobalObjects.GSetting.WebServiceEndPoint;
        }

        public int GetUserState(string userName, string psd)
        {
            Object result =  WebServiceHelper.InvokeWebService(webserviceAddr, 
                "GetUserState", new Object[] { userName, psd });
            return result == null ? 0 : Convert.ToInt32(result);
        }

        public int ApplicationRegedit(List<string> list)
        {
            Object result = WebServiceHelper.InvokeWebService(webserviceAddr,
                "ApplicationRegedit", new Object[] { list });
            return Convert.ToInt32(result);
        }

        public DataSet GetSynchronous(string where, string FieldSet, string tabTable)
        {
            Object result = WebServiceHelper.InvokeWebService(webserviceAddr,
                "GetSynchronous", new Object[] { where, FieldSet, tabTable });
            return result as DataSet;
        }


        public String[] UploadBills(DataSet BillsData)
        {
            throw new NotImplementedException();
        }


        public DataSet GetCustomers(string SiteId, DateTime dateStart, DateTime dateEnd)
        {
            throw new NotImplementedException();
        }


        public String[] UpLoadLogs(DataSet ds)
        {
            throw new NotImplementedException();
        }


        public DataSet GetCustomers(string SiteId, int pageIndex, int pageSize)
        {
            throw new NotImplementedException();
        }


        public int GetCustomerCount(string SiteId)
        {
            throw new NotImplementedException();
        }
    }
}
